<div class="layui-form" lay-filter="layuiadmin-form-admin" id="layuiadmin-form-admin" style="padding: 20px 30px 0 0;">
    <input type='hidden' id="flowJson" name="flowcontent" value=''>
    <div class="layui-form-item">
        <label class="layui-form-label">流程代码</label>
        <div class="layui-input-block">
            <input type="text" id="flowcode" name="flowcode" required placeholder="请输入流程代码" autocomplete="off"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">流程名称</label>
        <div class="layui-input-block">
            <input type="text" id="flowname" name="flowname" required placeholder="请输入流程名称" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">流水号前缀</label>
        <div class="layui-input-block">
            <input type="text" id="pre" name="pre" required placeholder="请输入流水号前缀" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">长度</label>
        <div class="layui-input-block">
            <input type="number" id="lengh" name="lengh" required placeholder="建议4位以上" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class=" layui-form-item">
        <label class="layui-form-label">流水号年份</label>
        <div class="layui-input-block">
            <input type="radio" name="year" value="1" title="是" checked>
            <input type="radio" name="year" value="0" title="否">
        </div>
    </div>
    <div class=" layui-form-item">
        <label class="layui-form-label">流水号月份</label>
        <div class="layui-input-block">
            <input type="radio" name="month" value="1" title="是" checked>
            <input type="radio" name="month" value="0" title="否">
        </div>
    </div>
    <div class="layui-form-item" id="spr">
        <label class="layui-form-label">流程管理员</label>
        <div class="layui-input-block">
            <div id="demo1" class="xm-select-demo"></div>
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="LAY-user-back-submit" id="LAY-user-back-submit" value="确认">
    </div>
</div>

<script src="/static/admin/layui/layui.js"></script>
<script src="/static/admin/js/xm-select.js"></script>
<script>
    layui.config({
        base: '/static/admin/' //静态资源所在路径
    }).extend({
        index: 'lib/index', //主入口模块
        treeTable: '../admin/lib/extend/authtree'
    }).use(['index', 'form', 'laydate'], function () {
        var $ = layui.$, form = layui.form, laydate = layui.laydate;

        $.ajax({
            url: "{:url('flow/adminTree')}",
            type: 'post',
            dataType: 'json',
            success: function (res) {
                xmSelect.render({
                    el: '#demo1',
                    filterable: true,
                    data: res
                })
            }
        });
        form.render();
    });
</script>
